﻿<UserControl x:Class="Microsoft.Kinect.Samples.KinectPaint.LoadPopup"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:local="clr-namespace:Microsoft.Kinect.Samples.KinectPaint"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             mc:Ignorable="d"
             DataContext="{Binding RelativeSource={RelativeSource Self}}">

    <Grid Style="{StaticResource LoadPopUpGridStyle}">
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition Width="37"/>
    		<ColumnDefinition Width="*"/>
    		<ColumnDefinition Width="Auto"/>
    		<ColumnDefinition Width="50"/>
    	</Grid.ColumnDefinitions>
        
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>

        <local:KinectPaintListBox ItemsSource="{Binding AvailableImages}"
                                  ItemTemplate="{StaticResource ArchivedImageTemplate}"
                                  SelectedItem="{Binding SelectedImage, Mode=OneWayToSource}"
                                  SelectionChanged="OnSelectedImageChanged"
                                  Style="{StaticResource LoadListBoxStyle}" Grid.Column="1" Grid.ColumnSpan="3" BorderThickness="0" />

        <local:KinectPaintButton Grid.Row="1"
                                 Content="Cancel"
                                 Click="OnCancel"
                                 Style="{StaticResource MetroButtonStyle}" Grid.Column="2" />
    </Grid>
</UserControl>
